package com.tyf.principles.demo2;

/**
 * @Description TODO
 * @Author shallow
 * @Date 2023/3/1 12:09
 */

public class RectangleDemo {
    public static void main(String[] args) {

    }

    //扩宽方法resize
    public static void resize(Rectangle rectangle){
        //判断款若果比长小，进行扩宽操作
        while (rectangle.getWidth()<= rectangle.getLength()){
            rectangle.setWidth(rectangle.getWidth()+1);
        }
    }
}
